using PCC.Notification;

namespace PCC.App.Notification
{
    public class NotificationContext : INotificationContext
    {
        public NotificationContext(string notificationType, INotificationSystem notificationSystem, IRecipient recipient)
        {
            Notification = new Notification(notificationSystem.Notification[notificationType]);
            Recipient = recipient;
            NotificationSystem = notificationSystem;
        }

        public INotificationSystem NotificationSystem { get; set; }
        
        public IRecipient Recipient { get; set; }
        
        public INotification Notification { get; set; }

        public string Subject
        {
            get { return NotificationSystem.Process(Notification.Subject); }
        }

        public string Body
        {
            get { return NotificationSystem.Process(Notification.Body); }
        }
    }
}